pick up (one's) marbles

Translations
ramasser ses billes et partir
Definitions
To withdraw from a situation or activity, often in a huff or in response to feeling upset or defeated, similar to a child taking their toys away when they are unhappy.